package org.liukai.ems.service;

import org.liukai.ems.dao.UserDao;
import org.liukai.ems.dao.UserLoginLogDao;
import org.liukai.ems.entity.po.UserLoginLog;
import org.liukai.ems.entity.vo.LoginLogVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserLoginLogService {
    //注入  该注解和@Resource一样
    @Autowired
    private UserLoginLogDao userLoginLogDao;

    public void addUserLoginLog(UserLoginLog userLoginLog) {
        userLoginLogDao.addUser(userLoginLog);
    }


    public List<LoginLogVO> queryLoginLog(String userId) {
        return userLoginLogDao.queryLoginLog(userId);
    }
}
